package com.jinzhi.eventresource.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.jinzhi.eventresource.dao.JzPermission;
import com.jinzhi.eventresource.dao.JzPermissionMapper;
import com.jinzhi.eventresource.vo.PermissionResourceListVO;
import com.jinzhi.eventresource.vo.PermissionSaveVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 资源库前台权限表 服务类
 * </p>
 *
 * @author author
 * @since 2024-09-29
 */
public interface IJzPermissionService extends IService<JzPermission> {
    /**
     * 分页查询
     *
     * @return
     */
    Map<String, List<JzPermission>> list(String userId);

    /**
     * 查询资源列表 资源 菜单 分组
     * @return
     */
    Map<String, List<PermissionResourceListVO>> resourceList();

    /**
     * 详情
     *
     * @return
     */
    JzPermission detail(String id);

    /**
     * 更新
     *
     * @return
     */
    Boolean update(JzPermission jzPermission);

    /**
     * 保存
     *
     * @return
     */
    Boolean save(PermissionSaveVO permissionSaveVO);

    /**
     * 删除
     *
     * @return
     */
    Boolean delete(JzPermission jzPermission);

    Boolean batchDelete(List<JzPermission> allocationIdList);

//    Boolean batchSave(List<JzPermission> jzPermissionList);
}
